import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

const store = new Vuex.Store({
    // 2. 配置为 vuex 的插件
  plugins: [createPersistedState()],
  state: {
    count: 10
  },
  modules: {
    app,
    settings,
    user
  },
  getters
})

export default store
